# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AndroidEnterprise.V1.Model.AppVersion do
  @moduledoc """
  This represents a single version of the app.

  ## Attributes

  *   `isProduction` (*type:* `boolean()`, *default:* `nil`) - True if this version is a production APK.
  *   `targetSdkVersion` (*type:* `integer()`, *default:* `nil`) - The SDK version this app targets, as specified in the manifest of the APK. See http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
  *   `track` (*type:* `String.t`, *default:* `nil`) - Deprecated, use trackId instead.
  *   `trackId` (*type:* `list(String.t)`, *default:* `nil`) - Track ids that the app version is published in. Replaces the track field (deprecated), but doesn't include the production track (see isProduction instead).
  *   `versionCode` (*type:* `integer()`, *default:* `nil`) - Unique increasing identifier for the app version.
  *   `versionString` (*type:* `String.t`, *default:* `nil`) - The string used in the Play store by the app developer to identify the version. The string is not necessarily unique or localized (for example, the string could be "1.4").
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :isProduction => boolean() | nil,
          :targetSdkVersion => integer() | nil,
          :track => String.t() | nil,
          :trackId => list(String.t()) | nil,
          :versionCode => integer() | nil,
          :versionString => String.t() | nil
        }

  field(:isProduction)
  field(:targetSdkVersion)
  field(:track)
  field(:trackId, type: :list)
  field(:versionCode)
  field(:versionString)
end

defimpl Poison.Decoder, for: GoogleApi.AndroidEnterprise.V1.Model.AppVersion do
  def decode(value, options) do
    GoogleApi.AndroidEnterprise.V1.Model.AppVersion.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AndroidEnterprise.V1.Model.AppVersion do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
